package com.ssm.controller;


import com.ssm.entity.User;
import com.ssm.service.IUserService;
import jakarta.servlet.http.HttpServlet;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;

@RestController
@RequestMapping("/user")
public class UserController extends HttpServlet {
    @Resource
    IUserService userService;

    @RequestMapping("/list")
    public List<User> getUsers() {
        return userService.getUsers();
    }
}
